package org.diysearch.services;

import java.util.HashMap;
import java.util.Map;

import org.diysearch.interfaces.Product;
import org.diysearch.products.HtmlProduct;

public class PrintException extends BaseExceptionService {
	private String productArg;
	
	public PrintException(String productArg) {
		this.productArg = productArg;
	}
	@Override
	public Product execute(Exception ex) throws Exception {
		Product p = new HtmlProduct();
		Map<String,Object> content = new HashMap<String,Object>();
		content.put("exception", ex);
		p.setWriter(writer);
		p.setCompleted(productArg, request, response, template, content);
		return p;
	}
	
	public boolean isWriter() {
		return true;
	}
	@Override
	public String getUri() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void setUri(String uri) {
		// TODO Auto-generated method stub
		
	}

}
